<!doctype html>
<html>
<head>
<title>Proxy For Chrome</title>
<style>
body {
      margin: 5px 10px 10px;
}

h1 {
	color: #53637D;
	font: 26px/1.2 Helvetica, sans-serif;
	font-size: 200%;
	margin: 0;
	padding-bottom: 4px;
	text-shadow: white 0 1px 2px;
}

div[role='main'] {
	border-radius: 5px;
	background: #EAEEF3;
	font: 14px/1 Arial,Sans Serif;
	padding: 10px;
	width: 563px;
	box-shadow: inset 0px 2px 5px rgba(0,0,0,0.5);
	-webkit-transition: background-color 0.5s ease-out;
	overflow: hidden;
}

div[role='main'].incognito {
      background: #496281 url('') no-repeat 533px bottom;
}

form {
	width: 563px;
	-webkit-transition: -webkit-transform 0.25s ease;
}

form.offscreen {
	-webkit-transform: translateX(-600px);
}

fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	position: relative;
}

legend {
	position: absolute;
	left: -999em;
}

form > fieldset {
	border-radius:  5px;
	border: 1px solid transparent;
	padding: 10px 10px 10px 30px;
	margin: 5px 0;
	-webkit-transition: all 0.5s ease;
}

form > fieldset:hover {
	background: rgba(255,255,255,0.1);
	border-color: rgba(0,0,0,0.1);
}

form > fieldset.active {
	background: rgba(255,255,255,0.25);
	border-color: rgba(0,0,0,0.25);
}

form > fieldset > input {
	margin-left:  -20px;
}

section {
	margin: 5px 0 0;
}

section fieldset:not(:first-child):not(:last-child) {
	-webkit-transition: all 0.5s ease;
	overflow: hidden;
	max-height: 1.6em;
}

section.single fieldset:not(:first-child):not(:last-child) {
	max-height: 0px;
}

section fieldset:last-child {
	margin-top: 5px;
}

section fieldset:last-child label {
	display: block;
}

section fieldset:last-child textarea {
	width: 412px;
}

section > fieldset {
	position: relative;
	padding-left: 60px;
}

section > fieldset > legend {
	left: 0;
	top: 4px;
	width: 53px;
	text-align: right;
}

input[type='url']:invalid:not(:active):not(:focus) {
	border-color: rgba(255,0,0,0.5);
	background: rgba(255,0,0,0.25);
}

input:invalid:not(:active):not(:focus):after {
	content: "This isn't a valid URL!";
	display:block;
}

input[type="checkbox"] {
	margin: 5px 0 5px 35px;
}

input[type="text"] {
	width: 200px;
	margin: 0 10px 0 0;
}

input.port {
	width: 50px;
	margin: 2px 10px 0 5px;
}

section label, section legend {
	color:  #999;
	-webkit-transition: color 0.5s ease;
}

.incognito section label, .incognito section legend {
	color:  #BBB;
}

.active section label, .active section legend, form > fieldset > label  {
	color:  #000;
	-webkit-transition: color 0.5s ease;
}

.incognito .active section label, .incognito .active section legend, .incognito form > fieldset > label {
	color: #FFF;
}

input[type="submit"], button {
	border-radius: 2px;
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
	-webkit-user-select: none;
	background: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
	border: 1px solid #AAA;
	color: #444;
	margin-bottom: 0;
	min-width: 4em;
	padding: 3px 12px;
	margin-top: 0;
	font-size: 1.1em;
}

.overlay {
	display: block;
	text-align: center;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 500px;
	padding: 20px;
	margin: -80px 0 0 -270px;
	opacity: 0;
	background: rgba(0, 0, 0, 0.75);
	border-radius: 5px;
	color: #FFF;
	font: 1.5em/1.2 Helvetica Neue, sans-serif;
	-webkit-transition: all 1.0s ease;
	-webkit-transform: scale(0);
}
.overlay a {
	color:  #FFF;
}

.overlay.visible {
	opacity: 1;
	-webkit-transform: scale(1);
}
</style>
</head>
<body>
  <h1>Proxy Configuration</h1>
  <div role="main">
    <form id="proxyForm">
      <fieldset id="system">
        <legend>System Settings</legend>
        <input type="radio" name="proxyType" id="proxyTypeSystem" value="system">
        <label for="proxyTypeSystem">Use the <em>system's proxy settings</em>.</label>
      </fieldset>
      <fieldset id="direct">
        <legend>Direct Connection</legend>
        <input type="radio" name="proxyType" id="proxyTypeDirect" value="direct">
        <label for="proxyTypeDirect">Your computer is <em>directly connected</em> to the internet; no need for a proxy.</label>
      </fieldset>
      <fieldset id="pac_script">
        <legend>Automatic Configuration</legend>
        <input type="radio" name="proxyType" id="proxyTypeAutoconfig" value="autoconfig">
        <label for="proxyTypeAutoconfig">Your proxy supports <em>automatic configuration</em>.</label>

        <section>
          <label for="autoconfigURL">Autoconfiguration URL (PAC file)</label>
          <input type="url" name="autoconfigURL" id="autoconfigURL">
          <input type="hidden" name="autoconfigData" id="autoconfigData">
        </section>
      </fieldset>
      <fieldset id="fixed_servers">
        <legend>Manual Proxy</legend>
        <input type="radio" name="proxyType" id="proxyTypeManual" value="manual">
        <label for="proxyTypeManual">Configure your proxy settings <em>manually</em>.</label>
        <section>
          <fieldset>
            <legend>HTTP</legend>
            <label for="proxyHostHttp">Host</label>
            <select id="proxySchemeHttp" name="proxySchemeHttp">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostHttp" id="proxyHostHttp">

            <label for="proxyPortHttp">Port</label>
            <input type="text" name="proxyPortHttp" id="proxyPortHttp" class="port">

            <input type="checkbox" name="singleProxyForEverything" id="singleProxyForEverything">
            <label for="singleProxyForEverything">Use the same proxy server for all protocols</label>
          </fieldset>
          <fieldset>
            <legend>HTTPS</legend>
            <label for="proxyHostHttps">Host</label>
            <select id="proxySchemeHttps" name="proxySchemeHttps">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostHttps" id="proxyHostHttps">

            <label for="proxyPortHttps">Port</label>
            <input type="text" name="proxyPortHttps" id="proxyPortHttps" class="port">
          </fieldset>
          <fieldset>
            <legend>FTP</legend>
            <label for="proxyHostFtp">Host</label>
            <select id="proxySchemeFtp" name="proxySchemeFtp">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostFtp" id="proxyHostFtp">

            <label for="proxyPortFtp">Port</label>
            <input type="text" name="proxyPortFtp" id="proxyPortFtp" class="port">
          </fieldset>
          <fieldset>
            <legend>Fallback</legend>
            <label for="proxyHostFallback">Host</label>
            <select id="proxySchemeFallback" name="proxySchemeFallback">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostFallback" id="proxyHostFallback">

            <label for="proxyPortFallback">Port</label>
            <input type="text" name="proxyPortFallback" id="proxyPortFallback" class="port">
          </fieldset>
          <fieldset>
            <label for="bypassList">Bypass proxy for these hosts:</label>
            <textarea id="bypassList" name="bypassList" placeholder="<local>,192.168.1.1/16, .example.com"></textarea>
          </fieldset>
        </section>
      </fieldset>
      <input type="submit" value="Save proxy settings">
      <button value="incognito">Configure incognito window settings.</button>
    </form>
  </div>
<script src="./proxy_form_controller.js"></script>
<script>
	var c = new ProxyFormController('proxyForm');
</script>
</body>
</html>
